package org.csmz.class2334;

import java.io.File;
import java.io.IOException;

public class example3 {
    public static void main(String[] args) throws IOException {
        File f1 = new File("D:\\file\\itheima.txt");
        if (f1.exists()) {
            System.out.println("删除文件itheima.txt: " + f1.delete());
        } else {
            System.out.println("创建文件: " + f1.createNewFile());
        }

        File f2 = new File("D:\\file\\aaa");
        System.out.println("创建目录 aaa: " + f2.mkdir());

        File f3 = new File("D:\\");
    }
}